//
//  XHQButton.m
//  初始通用工程
//
//  Created by xhq on 2017/7/4.
//  Copyright © 2017年 xhq. All rights reserved.
//

#import "XHQButton.h"

@implementation XHQButton

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/


-(void)setBlock:(void (^)(UIButton *))block
{
    _block = [block copy];
    [self addTarget:self action:@selector(xx:) forControlEvents:UIControlEventTouchUpInside];
}

-(void)xx:(UIButton *)b{
    _block(b);
}

@end
